Skip to content

switch to use snapshots.insert instead of disks.createsnapshot #1940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

pwschuurman
Copy link
Contributor

@pwschuurman pwschuurman commented Feb 14, 2025

What type of PR is this?
/kind bug

What this PR does / why we need it:
If we use disks.CreateSnapshot, there could be a race condition where snapshot.Status is "READY" but the snapshot creation is not actually done. Snapshots.Insert API avoids this problem.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

  • snapshot.insert will try to grab resource lock too according to Xin.
  • CMEK implicitly will be populated from PD if left blank, which keeps the previous behavior

Does this PR introduce a user-facing change?:

use `snapshots.insert` instead of `disks.createsnapshot` when creating pd snapshots. This requires usage of `csi-snapshottter` with minimum version 7.0.0

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 14, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pwschuurman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2025
@pwschuurman
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels Feb 14, 2025
@pwschuurman
Copy link
Contributor Author

/retest

@pwschuurman pwschuurman marked this pull request as ready for review February 14, 2025 19:26
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 14, 2025
@pwschuurman
Copy link
Contributor Author

/assign @amacaskill

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Feb 14, 2025
@pwschuurman
Copy link
Contributor Author

/retest

@pwschuurman
Copy link
Contributor Author

/retest pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@k8s-ci-robot
Copy link
Contributor

@pwschuurman: The /retest command does not accept any targets.
The following commands are available to trigger required jobs:

/test pull-gcp-compute-persistent-disk-csi-driver-e2e
/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration
/test pull-gcp-compute-persistent-disk-csi-driver-sanity
/test pull-gcp-compute-persistent-disk-csi-driver-unit
/test pull-gcp-compute-persistent-disk-csi-driver-verify

The following commands are available to trigger optional jobs:

/test pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2019

Use /test all to run the following jobs that were automatically triggered:

pull-gcp-compute-persistent-disk-csi-driver-e2e
pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration
pull-gcp-compute-persistent-disk-csi-driver-sanity
pull-gcp-compute-persistent-disk-csi-driver-unit
pull-gcp-compute-persistent-disk-csi-driver-verify

In response to this:

/retest pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@pwschuurman
Copy link
Contributor Author

/retest

1 similar comment
@pwschuurman
Copy link
Contributor Author

/retest

@pwschuurman
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@pwschuurman
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@pwschuurman
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Feb 15, 2025

@pwschuurman: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gcp-compute-persistent-disk-csi-driver-e2e 19cce11 link true /test pull-gcp-compute-persistent-disk-csi-driver-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@pwschuurman
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

7 similar comments
@pwschuurman
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@pwschuurman
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@pwschuurman
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@pwschuurman
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@pwschuurman
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@pwschuurman
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@pwschuurman
Copy link
Contributor Author

/test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

@pwschuurman
Copy link
Contributor Author

Fixed in #1857

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants